package com.guomao;

public class Person {

    private String name;
    private int age;
    private String id;

    @Override
    public boolean equals(Object obj) {

        Person p = (Person) obj;

        if (this.age != p.age) return false;

        if (!this.name.equals(p.name)) return false;

        if (!this.id.equals(p.id)) return false;

        return true;
    }

    public Person() {
    }

    public Person(String name, int age, String id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    @Override
    public String toString() {
        return this.name + " " + this.age + " " + this.id;
    }
}
